<?php
/**
 * Create By: PhpStorm
 * User: yuanxuncheng
 * File: GetFlashSale.php
 * Date: 2017/1/2
 * Time: 23:13
 */

namespace app\api\model\page\common;

use app\api\model\dao\WordForbidden;
use app\library\PageBase;

class GetForbiddenWord extends PageBase
{

    private $objWordForbidden;

    public function __construct()
    {
        parent::__construct();
        $this->objWordForbidden = new WordForbidden();
    }

    public function excute($param)
    {

        $data = [];

        $forbidden_word = $this->objWordForbidden->getAllWord();
        if (!empty($forbidden_word)) {
            foreach ($forbidden_word as $word) {
                $data[] = $word['word'];
            }
        }

        $this->data = $data;

        return $this->getRes();
    }
}
